home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Packmags
/
NewsFlash - Issue 07 (1990-01)(UGA - 17-Bit Software)(Disk 1 of 2)[a].zip
/
NewsFlash - Issue 07 (1990-01)(UGA - 17-Bit Software)(Disk 1 of 2)[a].adf
/
sources
/
Alert.S
next >
Wrap
Text File
|
1988-01-19
|
1KB
|
57 lines
; Display an Alert
; (C)1989 by Brian Postma
; J.v.Hartenstraat 51
; 7576VX Oldenzaal (NL)
; Tel:05410-14763
start: move.l 4,a6 ;Execbase
lea intname,a1 ;Library Name
jsr -408(a6) ;Open Library
move.l d0,intbase ;Library Base
lea dosname,a1 ;Library Name
jsr -408(a6) ;Open Library
move.l d0,dosbase
move.l dosbase,a6 ;fetch handle from current
jsr -60(a6) ;Output device->CLI
move.l d0,handle ;And save it
move.l intbase,a6
move.l #0,d0 ;Alert Number
move.l #64,d1 ;Alert Height
lea alert,a0 ;Alert Text
jsr -90(a6) ;Display alert
tst.b d0 ;Left or Right Button
beq right ;Right Mousebutton ??
left: move.l #lefttext,d2 ;Buffer
move.l #el-lefttext,d3 ;Length
bra text
right: move.l #righttext,d2 ;Buffer
move.l #er-righttext,d3;Length
text: move.l handle,d1 ;Output Handle
move.l dosbase,a6
jsr -48(a6) ;Write (to CLI)
quit: clr.l d0
rts
;Vars
handle: dc.l 0
dosbase: dc.l 0
intbase: dc.l 0
lefttext: dc.b "You pressed the LEFT mouse button",10,10
el:
righttext: dc.b "You pressed the RIGHT mouse button",10,10
er:
x1 = 236
y1 = 16
x2 = 240
y2 = 32
x3 = 184
y3 = 48
alert: dc.b x1/256,x1,y1,"Created for UGA PD by",0,1
dc.b x2/256,x2,y2,"Brian Postma in 1989",0,1
dc.b x3/256,x3,y3,"Press any mouse button to continue",0,0
; 0,1 means: there is more text coming,
; 0,0 means: end of all alert data.
intname: dc.b "intuition.library",0
dosname: dc.b "dos.library",0